#ifndef INCLUDED_PROJECTILEENEMY_H
#define INCLUDED_PROJECTILEENEMY_H

#include <SGE.h>
using namespace SGE;

#include "Enemy.h"
#include "Projectile.h"
#include "Health.h"

class ProjectileEnemy : public Enemy
{
	public:
		ProjectileEnemy();
		virtual ~ProjectileEnemy();

		virtual void Load();
		virtual void Unload();
		virtual void Update(float deltaTime, Map& map, Character& character);
		virtual void Render(const SVector2& viewOffset);

		void Spawn(const SVector2& pos, const SVector2& vel, const SVector2& projVel);
		virtual void Kill();

		virtual SRect GetBoundingBox() const;
		
		void VelocityShift(const Map& map);

		void FireProjectile(float deltaTime);
		void DealProjectileDamage(Character& character);

		Health mCurrentHealth;

	private:
		Projectile mProjectiles[100];
		const int kMaxProjectiles;
		int mProjectileIndex;
		float mProjectileDelay;
		SVector2 mProjectileVelocity;

		SGE_Sound mLarryDamage;
		SGE_Sound mDeathSound;
};
#endif // #ifndef INCLUDED_PROJECTILEENEMY_H